Conventionally, there is a game where a user operates a hand-held game apparatus while holding it, and causes the hand-held game apparatus to display a game screen based on the operation. The hand-held game apparatus generates a game image on the basis of various operations performed on an operation key, a touch panel, and the like by the user, and advances a game by displaying a game image on a display section provided in the hand-held game apparatus.
In the hand-held game apparatus, however, the game image is displayed with respect to directions defined in advance in the display section of the hand-held game apparatus. Thus, if the user changes the direction in which they are holding the hand-held game apparatus, it becomes difficult to view the game image displayed on the display section.
Therefore, it is an object of the exemplary embodiment to provide a storage medium having stored thereon an information processing program capable of, when an image of a virtual world is displayed on a display apparatus that allows a user to view a screen thereof while holding it, displaying a suitable image on the apparatus, regardless of the direction in which the user is holding the apparatus, and an information processing apparatus, an information processing system, and an information processing method that are capable of, when an image of a virtual world is displayed on a display apparatus that allows a user to view a screen thereof while holding it, displaying a suitable image on the apparatus, regardless of the direction in which the user is holding the apparatus.
To achieve the above object, the exemplary embodiment may employ, for example, the following configurations. It is understood that when the description of the scope of the appended claims is interpreted, the scope should be interpreted only by the description of the scope of the appended claims. If the description of the scope of the appended claims contradicts the description of these columns, the description of the scope of the appended claims has priority.
In an exemplary configuration of a computer-readable storage medium having stored thereon an information processing program according to the exemplary embodiment, the information processing program is executed by a computer of an information processing apparatus capable of displaying an image on a portable display apparatus that outputs at least data based on an attitude and/or a motion of the portable display apparatus body. The information processing program causes the computer to execute: calculating, on the basis of the data output from the portable display apparatus, a direction of rotation of the portable display apparatus about a predetermined direction in real space; controlling an attitude of an object, placed in a virtual world, such that the object rotates in the direction of rotation about a direction that corresponds to the predetermined direction and is set in the virtual world; controlling an attitude of a first virtual camera, for generating an image of the virtual world including at least the object, such that the first virtual camera rotates in the direction of rotation about the direction that corresponds to the predetermined direction and is set in the virtual world; and displaying on the portable display apparatus a first image representing the virtual world viewed from the first virtual camera.
It should be noted that the information processing apparatus may be an apparatus that performs game processing and generates an image based on the game processing, or may be a versatile apparatus such as a general personal computer. The portable display apparatus may have a size small enough to be carried by a user. Typically, the portable display apparatus may be a display apparatus that allows the user to view an image displayed thereon by holding it with both hands. Further, as in a terminal apparatus according to the embodiment described later, the portable display apparatus may or may not include components other than: means for outputting at least data based on the attitude and/or the motion of the portable display apparatus body; and means for displaying the first image.
Based on the above, when an image of an virtual world is displayed on a portable display apparatus, it is possible to display a suitable image on the portable display apparatus, regardless of the direction in which a user is holding the portable display apparatus. Further, it is possible to display a suitable image in accordance with the attitude of the portable display apparatus, and simultaneously control the attitude of an object in a virtual world displayed on the portable display apparatus.
In addition, an amount of rotation of the portable display apparatus about the predetermined direction in real space may be further calculated on the basis of the data output from the portable display apparatus. The attitude of the object may be controlled such that the object rotates in the direction of rotation about the direction that corresponds to the predetermined direction and is set in the virtual world, and by an amount of rotation based on the amount of rotation of the portable display apparatus. The attitude of the first virtual camera may be controlled such that the first virtual camera rotates in the direction of rotation about the direction that corresponds to the predetermined direction and is set in the virtual world, and by an amount of rotation based on the amount of rotation of the portable display apparatus.
Based on the above, it is possible to display a suitable image in accordance with the amount of rotation of the portable display apparatus, and simultaneously control the attitude of the object in the virtual world displayed on the portable display apparatus.
In addition, the attitude of the first virtual camera may be controlled such that the first virtual camera rotates in the direction of rotation by the same amount of rotation as the amount of rotation of the portable display apparatus.
Based on the above, a virtual camera for generating the virtual world to be displayed on the portable display apparatus is caused to rotate in the same direction of rotation and by the same amount of rotation as the direction of rotation and the amount of rotation in and by which the portable display apparatus rotates. This enables the user to enjoy a feeling as if peeping at the virtual world through the portable display apparatus.
In addition, the information processing program may further cause the computer to execute calculating, on the basis of the data output from the portable display apparatus, a direction of gravity relative to the portable display apparatus. The direction of rotation and the amount of rotation of the portable display apparatus may be calculated with respect to the direction of gravity. The attitude of the first virtual camera may be controlled such that when the first image is displayed on the portable display apparatus, the direction of gravity relative to the portable display apparatus displaying the first image coincides with a direction of gravity in the virtual world displayed as the first image.
Based on the above, it is possible to change the direction of the virtual world displayed on the portable display apparatus so as to coincide with the direction of gravity applied to the portable display apparatus. This enables the user to enjoy a feeling as if real space were the virtual world.
In addition, the object may be controlled so as to rotate in the direction of rotation and by the same amount of rotation as the amount of rotation of the portable display apparatus, and to have such an attitude and position that a positional relationship between the object and the first virtual camera is fixed.
Based on the above, it is possible to display the object of the virtual world on a display screen of the portable display apparatus at a predetermined position. This facilitates the control of the object based on the attitude of the portable display apparatus.
In addition, using as the predetermined direction a predetermined axis provided in the portable display apparatus, the direction of rotation and the amount of rotation of the portable display apparatus about the predetermined axis may be calculated.
Based on the above, the portable display apparatus is moved and the attitude of the portable display apparatus is changed, so as to rotate at least about a predetermined axis provided in the portable display apparatus, whereby it is possible to control the attitudes of the first virtual camera and the object.
In addition, using as the predetermined axis a perspective direction of a display screen that displays the first image on the portable display apparatus, the direction of rotation and the amount of rotation of portable display apparatus about the perspective direction may be calculated. The attitude of the first virtual camera may be controlled such that, using a direction of a line of sight of the first virtual camera as a direction corresponding to the perspective direction, the first virtual camera rotates about the direction of the line of sight, in the direction of rotation and by the same amount of rotation as the amount of rotation of the portable display apparatus.
Based on the above, the portable display apparatus is moved and the attitude of the portable display apparatus is changed, so as to roll at least about the perspective direction of the display screen of the portable display apparatus, whereby it is possible to roll the attitudes of the first virtual camera and the object about the direction of the line of sight of the first virtual camera.
In addition, further using, as the predetermined axis, each of a height direction and a width direction of the portable display apparatus that are orthogonal to the perspective direction and are orthogonal to each other, the direction of rotation and the amount of rotation of the portable display apparatus about each of the height direction and the width direction may be calculated. The attitude of the first virtual camera may be controlled such that: the first virtual camera rotates about a height direction orthogonal to the direction of the line of sight of the first virtual camera, in the same direction of rotation and by the same amount of rotation as the direction of rotation and the amount of rotation about the height direction of the portable display apparatus; and the first virtual camera rotates about a width direction orthogonal to the direction of the line of sight of the first virtual camera and orthogonal to the height direction orthogonal to the direction of the line of sight of the first virtual camera, in the same direction of rotation and by the same amount of rotation as the direction of rotation and the amount of rotation of the portable display apparatus about the width direction of the portable display apparatus.
Based on the above, in addition to roll about the perspective direction of the display screen, the portable display apparatus is moved and the attitude of the portable display apparatus is changed so as to pitch and yaw, whereby it is also possible to control the attitudes of the first virtual camera and the object.
In addition, the attitude of the first virtual camera in the virtual world may be controlled so as to be the same as the attitude of the portable display apparatus in real space.
Based on the above, the attitude of the first virtual camera is controlled so as to be the same as the attitude of the portable display apparatus, whereby, in accordance with the user directing the portable display apparatus in the direction that they wish to view, it is possible to provide the user with, for example, an image as if peeping at the virtual world through the portable display apparatus. This makes it possible to provide the user with a feeling as if being in the virtual world.
In addition, image data indicating the first image may be output to the portable display apparatus. The portable display apparatus may include an image data acquisition unit and a display unit. The image data acquisition unit acquires the image data output from the information processing apparatus. The display unit displays the first image indicated by the image data acquired by the image data acquisition unit.
Based on the above, the portable display apparatus can function as a so-called thin-client terminal, which does not perform information processing.
In addition, the information processing program may further cause the computer to execute generating compression image data by compressing the image data indicating the first image. In this case, the generated compression image data may be output to the portable display apparatus. The compression image data output from the information processing apparatus may be acquired. The portable display apparatus may further include a display image decompression unit. The display image decompression unit decompresses the compression image data to obtain the image data indicating the first image. The display unit may display the first image indicated by the image data that has been acquired by the image data acquisition unit and has been decompressed by the display image decompression unit.
Based on the above, the first image is decompressed before being output from the information processing apparatus to the portable display apparatus. This makes it possible to output the first image at a high speed, and reduce delay caused between the generation of the first image and the display of the first image on the portable display apparatus.
In addition, besides the first image, a second image representing the virtual world viewed from a second virtual camera may be further displayed on another display apparatus connected to the information processing apparatus.
It should be noted that said another display apparatus described above is a display apparatus connected to the information processing apparatus, like a monitor 2 according to the embodiment described later. Said another display apparatus may be a component separate from the portable display apparatus, and may be any apparatus so long as it is capable of displaying the second image generated by the information processing apparatus. For example, said another display apparatus described above may be integrated with the game apparatus (in a single housing).
Based on the above, when processing based on the operation of moving and changing the attitude of the portable display apparatus is performed, it is possible to display the results of the processing not only on the portable display apparatus but also on said another display apparatus connected to the information processing apparatus. This enables the user to use, in accordance with the state of the operation or the user's preference, either one of images displayed on, for example, two apparatuses, and also view an image suitable for an operation of the user. Further, it is possible to use an image displayed on said another display apparatus connected to the information processing apparatus, as, for example, an image to be viewed by another person different from the user. This makes it possible to provide a viewing environment suitable also for the case where a plurality of people view the results of the processing.
In addition, the information processing program may further cause the computer to execute generating compression image data by compressing the image data indicating the first image. In this case, the generated compression image data may be output to the portable display apparatus, and, besides the compression image data, image data indicating the second image may be output to said another display apparatus without being compressed. The portable display apparatus may include an image data acquisition unit, a display image decompression unit, and a display unit. The image data acquisition unit acquires the compression image data output from the information processing apparatus. The display image decompression unit decompresses the compression image data to obtain the image data indicating the first image. The display unit displays the first image indicated by the image data that has been acquired by the image data acquisition unit and has been decompressed by the display image decompression unit.
Based on the above, the first image is decompressed and then output from the information processing apparatus to the portable display apparatus. This makes it possible to output the first image at a high speed, and reduce delay caused between the generation of the first image and the display of the first image on the portable display apparatus.
In addition, the information processing program may further cause the computer to execute setting, on the basis of a position of the object in the virtual world, the second virtual camera, for generating an image of the virtual world, at a position different from a position of the first virtual camera such that the object is included in the second image.
Based on the above, the same object is displayed not only on the portable display apparatus but also on said another display apparatus, and images of the virtual world that are different in the point of view are displayed thereon. This enables the user to use, in accordance with the state of the operation or the user's preference, either one of the images displayed on the two apparatuses when controlling the object.
In addition, the second virtual camera may be set at a position further away from the object than the first virtual camera is from the object. A range wider than a range of the virtual world represented by the first image may be displayed as the second image on said another display apparatus.
Based on the above, an image of the virtual world in a display range wider than that of an image of the virtual world displayed on the portable display apparatus is displayed on said another display apparatus connected to the information processing apparatus. This makes it possible to display on each display apparatus, for example, an image suitable for an operation of the user when the state of the virtual world is presented to the user.
In addition, the second virtual camera may be set at a position of viewing the object from a bird's-eye view in the virtual world. An image obtained by viewing from a bird's-eye view the object placed in the virtual world may be displayed as the second image on said another display apparatus.
Based on the above, an image of the virtual world based on the attitude of the portable display apparatus is displayed on the portable display apparatus, and an image of the virtual world obtained by looking down upon it is displayed on another display apparatus connected to the information processing apparatus. This makes it possible to display on each display apparatus, for example, an image suitable for an operation of the user when the state of the virtual world is presented to the user.
In addition, the portable display apparatus may include at least one of a gyro sensor and an acceleration sensor, each of which outputs data based on the attitude and/or the motion of the portable display apparatus body. In this case, on the basis of the data output from the at least one of the gyro sensor and the acceleration sensor, the direction of rotation and an amount of rotation of the portable display apparatus may be calculated.
Based on the above, using the data that is output from the gyro sensor and indicates the angular velocity generated in the portable display apparatus and/or the data that is output from the acceleration sensor and indicates the acceleration generated in the portable display apparatus, it is possible to accurately calculate the attitude and the motion of the portable display apparatus.
In addition, the exemplary embodiment may be carried out in the forms of an information processing apparatus and an information processing system, each including units that perform the above processes, and an information processing method including the above operations.
The exemplary embodiment makes it possible to, when an image of a virtual world is displayed on a portable display apparatus, display a suitable image on the portable display apparatus, regardless of the direction in which the user is holding the portable display apparatus.
These and other objects, features, aspects and advantages of the exemplary embodiment will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.